﻿using System;
using System.Collections.Generic;
using System.Linq.Expressions;

namespace FocusCareer.Repositories
{
    public interface IBaseRepository
    {
        T Get<T>(int id, bool withCurrentTransacfion = false) where T : class;
        IEnumerable<T> GetAll<T>() where T : class;
        bool Update<T>(T obj) where T : class;
        object Insert<T>(T obj) where T : class;
        void InsertList<T>(IEnumerable<T> list) where T : class;
        void UpdateList<T>(IEnumerable<T> list) where T : class;
        bool Delete<T>(T obj) where T : class;
        bool DeleteMultiple<T>(Expression<Func<T, bool>> predicate) where T : class;
        bool DeleteAll<T>() where T : class;
        void Commit();
        void Rollback();
    }
}
